#ifndef PROJECT_H
#define PROJECT_H

#include "main.h"
#include "DesignInterface.h"
#include "FlowebedInterface.h"
#include "Plant.h"
#include "PlantSpecies.h"

namespace std
{
	template <>
	struct less<Plant>{

		bool operator() (const Plant& lhs, const Plant& rhs)
		{
			if(lhs.y < rhs.y){
				return true;
			}else{
				if(lhs.y > rhs.y){
					return false;
				}
			}

			if(lhs.x < rhs.x){
				return true;
			}else{
				if(lhs.x > rhs.x){
					return false;
				}
			}

			if(lhs.y < rhs.y){
				return true;
			}else{
				if(lhs.y > rhs.y){
					return false;
				}
			}

			if(lhs.x < rhs.x){
				return true;
			}else{
				if(lhs.x > rhs.x){
					return false;
				}
			}

			return false;
		};
	};
} ;

class Project:
	DesignInterface,
	FlowebedInterface
	{
public:	
	Project(HWND _hParent);
	~Project(void);

	void setClasicSize();
	
private:

	string name;
	string designer;

	HWND hParent;

	set<Plant> plants;
	set<Plant> selectedPlants;

	bool save();

	//void onLButtonClick(double x, double y);
	//void onRButtonClick(double x, double y);
	//void onMouseWeel(double x, double y);

	void designOnLButtonClick(double x, double y);
	void designOnRButtonClick(double x, double y);
	void designOnMouseWeel(double x, double y);

	void designOnPaint(Graphics* g);
	void flowerbedOnPaint(Graphics* g);

	bool getSelected(double x, double y);

};


#endif
